#ifndef SCIN_PANEL_H
#define SCIN_PANEL_H

#include "frm_control_TPanelWin.h"
#include "scin_ctrl.h"
//#include "scin_error.h"
//#include "scin_edit.h"

namespace ant{

struct TScinPanel : public frm::control::TPanelWin{
	TScinCtrl *Scin;

    TScinPanel(frm::control::TWindow &Parent) : frm::control::TPanelWin(Parent){
		Scin = new TScinCtrl( *this );
		SetChildControl( Scin->GetHWnd() );
	}	   
	
	/*void SetDefault(){
		Scin = new TScinCtrl( *this );
		SetChildControl( Scin->GetHWnd() );
	}*/

    virtual void TPanelWin_SetWindowRect(grf::TRect Rect){
      ::MoveWindow(Scin->GetHWnd(), Rect.Left,Rect.Top,Rect.Width,Rect.Height,true);
    }

    virtual LRESULT TWindow_WndProc(TMessage &Message){
        switch(Message.Msg){
            case WM_NOTIFY:{
                Scin->OnNotify(Message );
                break;
            }
        }
        return TPanelWin::TWindow_WndProc( Message );
    };
    ~TScinPanel(){
        delete Scin;
    }
};

/*
struct TScinEditPanel : public TScinPanel
{
    TScinEdit *ScinEditCtrl;
    //
    TScinEditPanel(frm::control::TWindow &Parent) : TScinPanel(Parent){
        Scin = new TScinEdit( *this );
        ScinEditCtrl = dynamic_cast<TScinEdit*>( Scin );
        SetChildControl( Scin->GetHWnd() );
    }	   
};

/////////////////////////////////////////////////////////////////////////////
struct TScinErrorPanel : public TScinPanel
{
    TScinError *ScinErrorCtrl;
    //
    TScinErrorPanel(frm::control::TWindow &Parent) : TScinPanel(Parent){
        Scin = new TScinError( *this );
        ScinErrorCtrl = dynamic_cast<TScinError*>( Scin );
        SetChildControl( Scin->GetHWnd() );
    }	   
};*/

}

#endif